home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 8
/
Night Owl CD-ROM (NOPV8) (Night Owl Publisher) (1993).ISO
/
034a
/
aecur101.arj
/
CONTRIB
/
CURSES
/
SRC
/
DELWIN.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-08
|
641b
|
34 lines
/*------------------------------------------------------------
*
* delwin.c
*
* copyright (c) 1987,88,89,90 J. Alan Eldridge
*
* deletes a window structure, freeing malloc'ed memory
*
* NOTE: deleting a subwindow does NOT free buffer space
*
*----------------------------------------------------------*/
#include "curses.h"
int
delwin(win)
WINDOW *win;
{
if (!(win->flags & _WSUBWIN)) {
int y = getmaxr(win);
while (y >= 0)
free(win->buf[y--]);
}
free(win->buf);
free(win->firstx);
free(win->lastx);
free(win);
return OK;
}